import Vue from "vue";
import Vuex from "vuex";
Vue.use(Vuex);

const getters = {
  isMobile: state => state.isMobile,
  openSidebar: state => state.openSidebar,
  fullScreen: state => state.fullScreen
};

const state = {
  isMobile: true,
  openSidebar: false,
  fullScreen: false
};

const mutations = {
  trigglerFullScreen(state, isFull) {
    state.fullScreen = isFull;
  },
  isMobile(state, isMobile) {
    state.isMobile = isMobile;
  },
  trigglerSidebar(state) {
    state.openSidebar = !state.openSidebar;
  }
};

const actions = {};

export default new Vuex.Store({
  state,
  mutations,
  actions,
  getters
});
